/**
 * Created by MyPC on 2017/7/15.
 */
const db = require('../common/mongoose'),
  mongoose = db.mongoose,
  Schema = db.Schema;

let tagSchema = new Schema({
  // 标签名
  names: {type: String, unique: true},
  // 标签文章数量
  num: {type: Number, default:1},
  // 操作人
  operator: {type: String},
  // 操作时间
  operatorId: {type: String},
  // 创建时间
  createTime: {type: Date, default: Date.now},
  // 备注
  remarks: {type: String},
  // 删除时间
  deleteTime: {type: Date}
});

let TagModel = mongoose.model('Tag', tagSchema, 'tag');

module.exports = TagModel;